<!-- 子组件 Son.vue -->
<template>
  <div>儿子组件: {{ prop1 }}</div>
<!--  <button @click="$emit('fun',prop1+1)">+</button>-->
  <button @click="m">+</button>
</template>

<script lang="ts" setup>
const props = defineProps(['prop1']);
const emits = defineEmits(['fun']);

const m=()=>{
  emits('fun',props.prop1+1)
}
</script>

<style scoped>

</style>